Intermittent test failure - fixes #851

Fixes #851.