Heap space exhausted - solution and why

So I’m seeing this again:

But this time the change that triggers it is adding some vocabulary from:

(dict *(lock $)) lock old-fashioned old fashioned deadbolt

to:

(dict *(lock $)) lock old-fashioned old fashioned deadbolt door

If I remove a couple of words from another (dict *()) construct, then the error seems to disappear, but does this seem right? Should I be adding vocabulary manually to objects instead to avoid bumping up against this limit?

Or is this a symptom of something else that’s going wrong?

Edited to add:
I should say that I’ve not added any per-object variables - in fact I’ve cut it down to only two defined by me. But I have added about 50 more objects apparently, so maybe I’m just at a more fundamental limit?

Edited again:
I guess my concern is: I added one vocab word to a class of objects and encountered this error. If I removed a couple of words from a more numerous set of objects, should I be safe for now?