Detect versions in tags

Addresses #18300.