Fix crash when running mac spec suites [fixes #83136260]