I love the computer software comparison :). I’m sure Rumplestiltskin has always secretly had the upper hand in every deal hes made. I don’t think the curse didn’t effect him just because he was in that prison. Maybe there was one or Two more cell with diamonds. Then all the prisoners would remember. Well, it could explain if Belle really does remember… Or maybe since diamonds are rare, only Rumplestiltskin and belle’s cells were made of them. Or maybe it didn’t work on Rumple because he was the Dark One. OOH or maybe if he made the curse whenever Belle was living with him he made it to where the curse wouldn’t work on either of them. Then he didn’t realize that it worked on belle because he thought she was dead.