Fix the over-zealous ubquity optimization for SHA2, add tests.