Fix #7594

This looks simple, but the problem is quite deep, it has to do with the
value assigned to tag when prereq is the last thing called and the fact
that the recursion does not unravel in the prediced order wrt the tag
variable durring a prereq call.