Simplify custom version scheme handling
Detect versions in tag specs

Closes #18300.
Closes #20891.
Reject versions that aren't strings