Re #6198. Fix for crashing unit test on Mac.