Calling qcut with too many duplicates now gives an informative error

Closes #7751.