Perhaps there are some NULLs in the sub-SELECT's result? See the archivesconcerning the not-very-intuitive behavior of NOT IN with NULL.
regards, tom lane