Fix inability to delete views with sorts attached