Propagate --version fix to release/1.10 branch.

Add #567 to release/1.10 branch.