Open as text option is inconsistent

I’ve noticed two issues with the Open as Text option.

First, when some scripts open I don’t get the dialog. This seems to happen with scripts with “Pages” tells.

Second, when I open some scripts I do get the dialog, but when I click “Open as Text” the application launches anyway. So far I have only noticed this with inDesign scripts.