Fixed #2652 (container .size() check too strict)