Apply fix from 09d0aeb9f6b3b21ef67 to other script wrappers.