Fixes Bug #2138 posthash optimization