Backport FlashHash changes from 4.0

This will let us continue to use JSON sessions