ISPN-3366 Set the ignorePreviousValue flag only after the check was performed

The flag won't be set if the topology changes before the command is
replicated to the primary owner.