Merge pull request #2497 from dcrowell77/mempatch2_WORKING

Tweak memory issue revert