Using macbook running Lion, some software I'm using thinks there's an external monitor
I use a window manager by default (I highly recommend them anyway) and that will let you move windows back (my personal recomendation is Divy http://mizage.com/divvy/ - but I think they are all pretty similar)