Well, this was a strange one. You indeed found a bug in calibre, or at least a glaring inconsistency. Without going into too many technical details, if you use bulk metadata edit to set a series custom column and do not set the index, it displays as  but is actually stores "nothing" in the database. The "nothing" causes the problems later.
I have submitted a fix for this that should be in the next release. Note that the fix won't change existing data, but it will prevent it from happening with future edits.
You can work around the problem and fix the existing data by running this search
#collection:true and #collection_index:false
It will find all the books with the "displays 1 but really contains nothing" problem. Fortunately there aren't many of them, only around 30. Click on the first one in the list and type E to edit metadata. Go to the custom column information tab. You will see that the index for #collections is showing as 0.00. Click the up triangle to change it to 1.0 (or type 1 into the box). Press the Next button to go to the next book. Repeat until you run out of books.
Thanks for your help and patience with finding this problem.