There is also anti-cloning (a good way to get rid of unwanted eggs, but it can go wrong.)
Never ever deposit a Pokemon after saving the first time at the PC, because it will be anti cloned. The old save of the PC's contents, (which didn't contain the Pokemon) will be conbined with the new party save (it's not in your party anymore after being deposited) meaning that it goes away forever.
~Chibi~