Fix for bug #3618.

Fix typeclass resolution which was considering as subgoals
of a tactic application unrelated pre-existing undefined evars.