Fix problem with lookup' and unbound variables