Hi there!
It’s very possible the code I posted has a bug, I’ll have to investigate that. In the meantime, I recommend you take a look at the CLI tool I built in C++ https://github.com/iamtheburd/combigen. This was built specifically for handling large sets of data while maintaining performance. I think if you can generate your sets of combinations and feed it to the tool you’ll get the expected results.
Thank you for bringing this up!