Refractored context resolution for node/supernode