Works around a gcc9 memset warning by using offsetof instead of a direct field reference.
Fixes #4170 (closed)