The test now more precisely exercises the code where the crash happened.
The test case attempts to simulate the environment where the crash appears to have happened. Local testing does not point out any problems.