Might be slightly better to call loaded.add() first, because b.onLoad() is user code and there is always a chance it could try to register scoped again.