Fix Redmine/5748 - make defaults promises work in bundles using classes promise

Putting that in a separate commit would have facilitated review.
I take it (from the fact that the commit message claims to be changing behaviour) that you've mixed this up with material changes; it is easier to review those separate from clean-ups.