Avoid using raw_reference_cast