Fix percent per item calculator to work when no rules restricting products.

Fixes #2660