More workarounds for deleted C/C++ object errors