Fix `insertBefore` positioning when using a large negative number.