Fix ICE and runtime asserts in libdruntime unittester