fix Issue 9806 - assertion failure in struct.c:668