Selecting the flavor using the flavor bar or a scripting method are the same thing, so yes, this won't work.
I see a use case however when someone wouldn't want to permit selecting a flavor manually by the user but the same should be allowed via a script... so it is debatable whether this SHOULD be possible ![]()