Fix the version ordinal handling, now with tests