Fixed issue with subselects inside function parameters.