Optimize dotted searchlist lookup

The interesting bits from this PR:

```
lookup_dotted_sl_opt_off 6474 iterations
lookup_dotted_sl_opt_on 8265 iterations
```