Fix a sporadic test failure on Safari

Fixes #131