This commit makes sure to unwrap any transaction aware cache before collecting metrics for them. Closes gh-13861