Today I came across an Issue where every list I create based on a particular Custom Template was displayed as two in the SharePoint UI and while querying through Object Model.
It was strange because content, Name, URL etc of the list is exact same. There was no issue while working with this list Add/Edit/Delete & view items worked very fine. It affected while fetching Lists for creating a custom WebPart, because Tasks that was fetched from these list were displayed twice.
When I click on each of the list, each takes me to different view, this was my first clue. After an attempt to delete one of the View to see what happens I came to know that both the View are set as default and I was not able to delete either of them. But using the ViewEdit.aspx it is not possible to set two Views as default, because setting a view to default view will reset earlier default view to false. So the issues traced back to Schema.xml. In List Template Schema we have Tags to define Views for the List. And one attribute of that View Tag is called DefaultView.

This attribute was set to TRUE for two views. Setting one of them back to FALSE, solved the issue but only for the new lists, existing list were behaving the same way. I wrote a command line utility will get two views and set one of them to false.
SPList oList = oWeb.Lists["TheList"];
SPView spView=oList.Views["X"]; spView.DefaultView = false;
spView.Update();
//Just setting the View X to be non Default didnt work I
//had to set the other to true forcibly
spView = oList.Views["Y"];
spView.DefaultView = true;
spView.Update();
As noted in the comment just setting the view X to false didn't work, I had to set the other view to true forcibly. I tried to peek through SPView.Update() code but it was obfuscated. Things that we do in SharePoint using Templates (XML) are just passed in, and any small mistake like this will have major impact as well. So be cautious while working on Templates.