Fixing if-conditional of pair checking algorithm in MountPeriodicVector().