ISPN-3357 Fix the OutdatedTopologyException check during remote invocation

I made some mistakes when rebasing from 5.2.x to master.