Same as the transform before.  onWarning has a syntax which only applies to a localised part of the expression tree.  This ensures that it doesn't leak out into other parts of the tree by restoring the previous state when the function exits.