Previously we would request the handle types with write access at the
start of every transform operation. Because the attribute arrays are
also used by the latest undo step, this would cause a reallocation of
the data and a copy. Instead only request write access if we're actually
going to modify the handle types.
This also lets us avoid tagging the topology cache unless the handle
types are actually changed.