Improve r172471: avoid all those extra casts on the lines nearby