Uses a snapshot of the reference to Master instead of a proxy

so that the master cannot change all of a sudden in the middle of
operations. This fixes a problem where a service which was instantiated
for one specific master continued to run for a different master after a
sudden master switch. Specifically this resulted in misuse of id ranges,
potentially received from a different master than expected.