Issue #181: Backports for SA-CORE-2013-001.
Merge pull request #166 from quicksketch/SA-CORE-2013-001

Issue #181: Backports for SA-CORE-2013-001.