Add support for concatenation operations in constant functions.

Also fix a compiler crash when attempting to evaluate a function
which has no valid statement(s) (due to earlier compilation errors).
Add support for system function calls in constant functions.