backport improved ember-app-kit lock