Fix isolated cases that violate gcc's -Wignored-qualifiers