Couldn't reproduce #1851, but this should work around the error if it happens again.