Seriously. Not just Catholics, either. My entire childhood and more than half my 20s was spent living in almost constant dread about this. Certain thoughts were verboten, and if they happened to appear, I hated myself for their existence.
I think it permanently warped me and I'm still kinda mad about it.
Every group and every culture has certain thoughts that are verboten. They just vary from group to group.