Use two-phase lookup in order not to degrade the performance.