Make tc/funapp follow contract in error case.

Closes PR 14615.