Fix function parameter classification bug
Add tests for fix for SF#557