Push the current matrix stack down by one, duplicating the current matrix, excute the given action, and pop the current matrix stack, replacing the current matrix with the one below it on the stack (i.e. restoring it to its previous state). The returned value is that of the given action. Note that a round-trip to the server is probably required. For a more efficient version, see unsafePreservingMatrix.
A more efficient, but potentially dangerous version of preservingMatrix: The given action is not allowed to throw an exception or change the current matrix mode permanently.