[WIP] De Bruijn indices

Unfinished but may be useful for other stuff.