add support for outside query having multiple functions. part of upgrade to drupal eval