Fix Issue 3013 - Duplicate error message on calling a function with a type