For the program provided as the test case flang fired the following
error:
error: Semantic errors in main.f90 error: 'foo' is not a procedure
This change fixes the error by postponing handling of UseErrorDetails
from CharacterizeProcedure to a later stage.
Nit: Just add a comment about what this test is testing.