It looks like there is a bug in jQuery UI Dialog where there closeOnEscape doesn't work properly, such that escape will still close the dialog. One possible solution is to unbind the keydown on the overlay, but this doesn't seem to work.
Is there another solution that works?
Here is the link for bug and fix for 1.6, but 1.5.3 is still broken: http://dev.jqueryui.com/ticket/3253