Fix splitLookup and split.

Fix wrong implementation and tests as observed by @kgeorgiy.

There is no performance difference if ``` split ``` and ``` splitLookup ``` are implemented separately.