Why do you uniquify the maps?  I can imagine building a sparsity pattern where the same pair of maps appears more than once.  What happens in that case?