Add some ifdefs for the PETSc version related to local indexing.
Merge branch 'garth/merge-fix-119' into next