This is a well-known bug in W3D: it breaks programming guidelines and opens disk-based sub-libraries in the library inticode, thus overflowing ramlib stack. This bug was reported repeatedly but it was never fixed.
Install MCPRamlibPatch or other patch to raise ramlib stacksize and the problem will be worked around.
MCPRamlibPatch can be found from
MCP132b12.lha, MCP/Tools/MCPRamlibPatch.
Or install MMULib/Fixes/RamLibFix from
MMULib.lha.