NOJIRA: Removed spacing differences from upstream

Previous commit had different spacing and indentation in some lines, so
had ~1300 diffs. New version is the same code for PAHMA-852, just edited
to conform to the upstream master