The same thing happened to me when this feature came out in iTunes 7.0. One cause I found was the Album Artist field had values some times. Compilations must also be marked as a compilation.
What I did to fix it was to select all tracks for an album that was a problem and Get Info. I then made sure every field that was supposed to be the same for the album was populated and I checked all of the blank fields that should be blank for the entire album.
It was almost always the Album Artist though, so the first thing you can do is set the Album Artist to blank for every track that this is happening for, as long as you want it blank.
You can also display more columns and see which are causing the problem.