Cleanup of metadata fetching so that we're sure to only fetch once during version matching/selection

+review REVIEW-5227