Merge pull request #586 from cjdelisle/hardening-bug-workaround