that is most likely due to an error-checking routine that checks specifically for 2 sequential complementing operations of the same number to bring you back to your original number.
the computer still has no concept of the real solution to that problem as humans do, it just has a special instance error-checking for that type of problem.