Optimization to shared strings search.