Thanks Gordon for reporting the bug.
For anyone reading this discussion, if you'd like the bug to be fixed, please go to MDL-60181 and vote for it. (If you've not used the Moodle Tracker before, you'll need to create an account in order to be able to vote and comment etc. on issues.)