Mild const-correctness improvements.