Wrap RelationalFunctionCalls in joins for HSQLDB

Fixes #1061