fix division by zero in core-list

Fixes https://github.com/dart-lang/core-elements/issues/124