I also realised that this problem was only with 'Modal Dialogs' and hence IE specific.
I tried in vain to understand where we were doing things wrong. Lady luck was shining on me, when I found this link that explains the problem.
Snippet from the microsoft site:
When Internet Explorer opens a window from a modal or modeless HTML dialog box by using the showModalDialog method or by using the showModelessDialog method, Internet Explorer uses Microsoft Component Object Model (COM) to create a new instance of the window. Typically, the window is opened by using the first instance of an existing Internet Explorer process. This process is different from the process that Internet Explorer uses to open a new window by using the window.open method.
When Internet Explorer opens the window in a new process, all the memory cookies are no longer available, including the session ID.
The workaround was to pass the window object of the parent of the dialog box into the dialog box, and then use that object to open the new window.
For e.g. In the parent window:
var args = new Object;
args.window = window;
And in the child window: