Improve selectivity calculations.

With this change we no longer discard label predicates after using them.
Merge pull request #3213 from pontusmelke/improve-selectivity-calculations

[2.2] Improve selectivity calculations.