Make testGetTagsOnCommit consistent in its two implementations

Odd that the inconsistent implementations did not fail on the laptop,
but failed in the Jenkins job.