Function declarations inside of expressions and arrays should behave the same

Fixes #485