In your code snippet above, you are using the same while loop for all your screens, and you are always getting the port to wait on from screen b. Yet, in popAndShow() you call Close() on the screens one of which may be the required screen b. When you call Close() on screen b and then call wait on b.getMessagePort() you are trying to get a port from an object that no longer exists....
I recommend you structure your code to have a method per screen that sets up the screen then calls an event loop for the screen that uses the port that screen was set to.
You have the right idea about managing references to screens for a non stack based navigation, but you must take care in getting this code all correct and testing every possible navigation. Make sure this non-standard navigation is worth the extra complication in your code. (Sometimes it is like when you create a 'new station' in Pandora and jump to that new station, but then when exiting the station you go back to the home screen not the new station screen because the new station screen had been previously closed).
--Kevin