Optimize dotted searchlist lookup

The interesting bits from this PR:

```
lookup_dotted_sl_opt_off 7373 iterations
lookup_dotted_sl_opt_on 9485 iterations
```