Bug 1053999 - Rationalize stack recursion checks, r=bholley, a=lsblakk

--HG--
extra : rebase_source : 0fcbc5ee205178a4e8ece8071daad1cc62f26feb
extra : histedit_source : 804836b168c5f321fc5c30cdb037e8261cc5bb60