It may have that parent-window drawback, but since the method successfully opens a dialog and other code runs fine as well, I feel that "we define" is not optimal. You're leaving terrain here. The terrain of consistency and common expectations when dealing with an API.
My primary goal on this is to give a hint on something that gets you stuck, since it works against the rules. Bending the rules is fine at times, but the scripting should try to not create another condition/exception/command-dependency hell that we already have in the older button system.
Thank you nonetheless.