Let's say you have a font that has a set of Cyrillic alternates in the “round upright cursive with extenders” aka “Bulgarian” style, and the default Cyrillic glyphs are in the “square” aka “Russian” style.
You could implement a substitution lookup that replaces the square with the round style in the “locl” (Localized Forms) feature for the “cyrl BGR” (Bulgarian) languagesystem. Apps that support it would automatically do the replacement if the user tags the text as being set in the Bulgarian language (also for spellcheck and hyphenation purposes).
In addition, you could implement the replacement in a stylistic set (e.g. “ss04”) for use in apps that don't support localized forms.
But imagine that a user who users an app that supports localized forms tags the text as Bulgarian for spellcheck and hyphenation purposes, but they would prefer (for whatever reasons) to set it in the square (“Russian”) typographic style. It's not obvious how they could achieve that, because the app might not offer any UI to deactivate “locl”.
I think the solution should be that the same “ss04” feature works both ways:
One and the same lookup replaces the alternate forms with the default ones and the default ones with the alternates.
So if the input string had the default forms, with “ss04” applied, you get the alternates, but if it had the alternates (as a result of the previously automatically applied "locl"), you get the defaults. So effectively, you get a “swap”. There is no risk of any circular replacements if the swapping is done inside the same lookup.
This could be of course also done in two different stylistic sets, but if your font has many stylistic sets, this might be unreasonable. So it is a question of UX.
This technique could be used for any replacements that are performed automatically which the user might want to “undo”. What do you think?