Make the XBlock runtime cancel new modals correctly