These previous patches don't seem to solve the problem: here is another reduced case that still fails in resolve_equivalence at a different place than before.
$ cat bug.f CALL TRFWTM(JKT,XX,NX,Y,NIX,NORB2,1,TOL) IF(DBUG.AND.NX.GT.0) THEN EQUIVALENCE (DBUGME, DBUGME_STR) END IF END