Allow primary table in select to be query expression. Fixes #42