PRD-4984 - Fixes for multiple entries

Make sure that the Xul dialog per query-entry is always reused and repaint events happen correctly.
(cherry picked from commit a498844)