Fix function calls with expressions

Fixes a bug where functions could not be called with expressions.
Adds a test case for this to the test suite.