Fix resource transformer & handling of add vs write-attribute ops