Error reflection for specific function arguments

Allow error reflection to be attached to a specific function argument. See test038 for an example.

This PR also fixes issues related to error handlers in IBC files.