Fix a bug in LookupJoin