Note above that this patch has changed the permission bits on the file and made it executable.  (I'm guessing this means you're using Windows...)  Please be sure to fix that before submitting pull requests...

It looks like this patch will fix the bug, but instead of patching this hack, I think there is a better way to do it.  I'll leave more details in bugzilla.