I have a problem using optional arguments before an OptionsPattern:
Options[f] = {"Opt" -> None};
f[x_, y_:Automatic, OptionsPattern[]] := {x, y, OptionValue["Opt"]}
f[1, "Opt"->"wrong"] (* returns {1, "Opt" -> "wrong", None} *)
As you can see, mma assigns y the option rule, not Automatic!
What is the fix here?
This might be a known bug, as I remember encountering this type of thing before, or maybe I just forgot how to handle it?