Could you edit your question to provide a MWE that works when copied and pasted so that it can be tried out ? It is very hard (sometimes impossible) to debug without trying it out.
Could you also specify which version of Equations you are using ? Some stuffs like handling of with clause have been improved in Equations 8.20.
Otherwise, all I can see is that it seems like a dependency issue. You are trying to rewrite a variable but another depends on it or sth like that, so I don't think it is an issue with Equations. You can try to unfold / destruct inspect first to see what is going on.