Improve some const-correctness to remove a -Wcast-qual warning. No functional changes intended.