[#693] Correct the logic for interactively eval-ed defs lookup