Proposal to fix trac #17155

This is the patch proposed by rcgill on trac. It is needed by the pull request #38 on dojo/dojo.
 * See https://bugs.dojotoolkit.org/ticket/17155 for more details.