Fixed FlexiRate Calculator when max_items is set

Fixes #3159