[algorithms] Fix gram_schmidt_basis_extension for copy_basis == False