Work on local dof indexing in sparsity pattern builder.

Compiles, but not working yet.