Honour validly tagged versions.

There was a bug in the code to ignore bad tags - we stopped outputting
actual release versions altogether.

Change-Id: I0eb3fe6a09f0e696b96eab1e14549ea0a8fe27ba
Closes-Bug: #1370608