Revert "Revert "Revert "Merge pull request #753 from runrevfraser/bugfix-12241"""

This reverts commit 3fab1e5504d4b63096e6341bb5175ba01f216a78.