I do attach _some_ value to my ideas, but I do my best to wait with that until I've thought about it a bit and scoped out its feasibility. Bugs I don't mind at all - they're either mistakes (which just happen due to complexity) or indications of insufficient understanding. What I find a bit discouraging is discovering, after starting to work on an idea, that it's bad, infeasible or requires an order of magnitude more work than initially assumed. But I try to see it as gaining knowledge about problem domain, not defeat.
I suppose I could frame it slightly differently: it's not about not having emotional attachment, but about not making an idea part of your identity. When someone points out a flaw in a cool idea you had, you're sad because the cool thing won't happen. When they point a flaw in your idea, it feels as if they're pointing a flaw in you.
I do think many people attach emotional value to their ideas, and any perceived imperfections invalidate the idea as a whole. I don't have any evidence of this that might generalize, but personally I feel like I (and potentially many programmers) never attach _any_ emotional value to my ideas, because if I did then every single bug I face in my code would be a defeat rather than an opportunity to learn and grow.