Two Login items: menu extra hogs focus of dialog in applet

I have a nagging problem with an applet that is a login item. First thing upon launch it brings up a “display dialog” that is visible, but not exactly frontmost: It’s grayed-out a little and I can’t hit return or esc to do the “OK” or “Cancel” button, but have to mouse over and click the dialog first. I know that what’s causing it is a menu extra which is a “faceless background application” that’s also a login item which loads after my applet. For the life of me I can’t get any combination of activates or setting frontmosts or anything else to bring my applet’s dialog to focus by itself. Anyone here ever encountered this situation before?

Model: MacBook Pro (5,2)
AppleScript: 2.1.2
Browser: Firefox 28.0
Operating System: Mac OS X (10.6)

I got this to work as a vulgar workaround:

try
	repeat with countdown from 10 to 0 by -1
		activate
		if button returned of (display dialog ¬
			"[So-and-so will happen] unless you cancel" & return & ¬
			"within " & countdown & " seconds" giving up after 1) ¬
			= "OK" then exit repeat
	end repeat
	
on error
	error number -128
end try

…and you can see the menu extra stepping on the dialog as it flashes, counting-down, making it gray-out a little as it loses focus, but hitting the return or escape key usually will make it through.

But I’d really like to know what’s going on behind the scenes (pardon the pun!). All of you have seen it, e.g., when you’re entering text in some program’s text field, then you pause to check the date in your handy-dandy menu bar calendar (a “menu extra”), and then when you dismiss the calendar window, your program’s text field still hasn’t regained focus, and you have to click the program’s window before you can resume typing.

What I’m looking for is the best AppleScript way to bring the display dialog back to focus by itself.