Further simplification of version selection processing rules and added a few tests

+review REVIEW-5137