I have a comp, let's call it "Comp 1". I have a lot of expressions in there which include "thisComp", eg.
If I then rename my comp to "Comp 2", I get an error (including the orange box saying "This project contains expression errors") saying "Comp 1 is missing or does not exist" or similar, even though I'd never explicity used "Comp1 " in the expression - just "thisComp". If I then just click through each expression (by clicking on the magnifying glass in the orange warning banner), the errors go away, without me having to change anything. So AE knows that they're not real errors, but just takes some encouragement to get its head around the concept.