Initial (unfinished) work on outer unnest. Committing before refactoring for better support of 'NULL'