Owner.InvalidateViewState(); // is it referring to the dialog where the present dialog was called right?
Owner refers the owner component, the asking component X is actually displayed inside. This is not necessarily the dialog which triggered the PresentDialog( X, .... ) operation.
Well, I'm not sure whether that answers your question. If not, please explain more in detail the relation between the dialogs or components. See also the section Enumerate and search views existing within the component and Enumerate and search for existing Dialogs. Maybe the methods described there provide the desired functionality to find the dialog (= component, = view).
For example, assuming a component X is acting as dialog and you want to access the dialog, which was active in the same Owner just before X was presented, then following could work:
// 'this' represents the actual component X
var int32 index = Owner.GetIndexOfDialog( this );
var Core::Group prevDialog = Owner.GetDialogAtIndex( index + 1 );
// or, if 'this' dialog is actually the 'active' dialog within Owner:
var Core::Group prevDialog = Owner.GetDialogAtIndex( 1 );
I hope it helps you further.