rewrite TreeBitwiseLut to actually use a tree rather than a dict, hopefully making...