CORE-6306 Fix for saving output parameter 'retain' flags.