#618: remove unused code in sparsity_internal