Fix segfaults in the new tests
Under certain configuration on certain hosts, the new tests result in segfault. See https://ci.sivelkiria.org/job/SDK/job/Build%20and%20test%20SDK%20-%20Linux/ , https://ci.sivelkiria.org/job/SDK/job/Build%20and%20test%20SDK%20-%20Linux/525/console for details.
Need to debug this somehow. Use Valgrind or Sanitizers to check if there are issues.