Fix CID 1214301 and constify things