Replace to_SV_ref() and to_SV_clone_ref() with templated glue functions