if you parent your null to another layer, the position of the null will always be relevant to the parent layer. You need to use "toComp" (or "toWorld" for 3d layers) to get the global position of your null.
p = thisComp.layer("Null 1").toComp(anchorPoint);
s = thisLayer;
a = s.sampleImage(p,[.1,.1]);