A derivation of local commutativity from macrocausality using a quantum mechanical theory of measurement