This line is reached for write-attribute or undefine-attribute if NAME != INDEXING_PROPERTIES, but in that case "operation" isn't the model that should be passed to discard. In that case it should be context.readResource(PathAddress.EMPTY_ADDRESS).getModel().