Introduce package level `canSearchInCodeUnits`

And use it to solve bugs/simplify code.