Yikes, sorry. The test suite for this package auto-detects the number of CPUs and parallelises across all of them. This is not very well behaved when calling it from the outer build system, as it doesn’t pay attention to any -j flag you’ve passed there. To compound the situation, some of the individual test cases themselves are also multithreaded.
I think the simplest solution is to force the test suite to always run single-threaded when called via ctest. Can I close this bug by making this change when packaging the next upstream release? Or do I also need to upload new packages for the existing versions in Debian?