patch with @stefanpenner's fix for emberjs/ember.js#5629 https://github.com/emberjs/ember.js/pull/5629/