Ended up debugging for an hour, resulted in an assert. Read on.

So after implementing the node cache stuff and running a "generate many boards" I end up with a SIGSEGV.
After half an hour of thinking I'm crazy, I discover the mapping from squares->winlines is suddenly accessing wrong memory.
I think somehow the node cache is at fault and is free-ing something because it looks 1 item too far or something.

Turns out the check that looks for storing dupe boards is overrunning it's buffer and overwriting the s2w data. Sigh.