Discard label/tag when parsing Version string.

Review: https://reviews.apache.org/r/27115