see also DFHack/df-structures@61e52c799935a9236036c3be38513799e8023bb1