I also think it was part of his plan to get “tricked” by Cinderella and company. If you watch the scene in The Price of Gold, he seems to know she is trying to capture him using magic. I think somehow being in the prison preserved some of his memories as the curse was enacted. Not sure how, but I think it blocked some of the memory wiping properties of the curse.
Yeah, he didn’t seem the least bit concerned about getting caught. But then again, he probably knew that the curse was well on its way and that it didn’t matter what happeend to him. He’ll become a completely different person once the curse takes a effect anyway, so why worry?