Not invented by me vs. collective code ownership

A project that I worked on some time ago got into some trouble. As the project progressed, some parts of the code “owned” by some of the developers. The other developers grew a habit of not wanting to touch that specific code. This because of a number of reasons, but what striked me was the lack of collective code
ownership in the team. Parts of the system belonged to one single developer, which maked it very difficult for others to touch. And, of course, at some point, matters went from bad to worse when this developer left the project.
This made me realise how important collective code ownership is. It is fundamental to making agile methodologies work (originally introduced by XP, I believe).