Remove an unneeded const_cast