Fixes #144.

The offending table originally took over 8 hours to filter and write to disk. With this performance fix, it only takes ~30 seconds to run.