Prevent non-version tags from being used for version info.

Fixes #1141