Prevent rounding errors from causing a phantom scrollbar on Firefox

Issue #2371