Just solved this. You probably have two comps named the same, and the expression is looking into the comp that doesn’t have your layer. Just rename all of your comps which are linked by expression so no two have the same name. Worked for me… Also make sure none of the layers are named the same either.