checking better for subqueries (fixes problem with ambiguous identifier) (transplanted from 29a3b1f4f0cdef9da844e00b06f92ccd388443eb)
checking better for subqueries (fixes problem with ambiguous identifier)
(transplanted from 29a3b1f4f0cdef9da844e00b06f92ccd388443eb)

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb