Reduce overhead by removing a pointer.
Moved tag from pointer to its own field.
Unrolled child pointer following.

Keep a plain bitmask instead of an inverted bitmask.
This simplifies the logic.

Unrolled allprefixed and nextprev.