Refactor privileged code execution, protecting against un-stop()-ed privileged sections