Tweak the handling of disableElementWhileRunning