If you used 2-part names for your columns, it should become clear.
select *
from #Table1 t1
where t1.mykey in (select t1.mykey from #BadLookup bl)
It might look weird that the subquery is using a column from the outer query, but it's expected functionality and the base to correlated subqueries.
Luis C.
General Disclaimer:
Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?
How to post data/code on a forum to get the best help: Option 1 / Option 2