Fixed the grains.get_or_set_hash state example
preserve api per #13541
only destroy the stack if we need to
Merge remote-tracking branch 'upstream/develop' into sam_raet_46