Avoid passing temporary to get_ref_default()