fix erroneous double lookup detection