Remove a cast that is not needed.