Fix incorrect coercison to number of Git revision in build tool.

Refs #17176.