Fix bug in BCE remainder handling.

Rationale:
(1) code was looking up index in wrong block
(2) code was merging monotonic (rather than the other way around).
This
(a) caused DCHECK failure, reproduced and fixed with new test
(b) missed cases, reproduced and fixed with new test

Bug: 65551926

Test: test-art-host
Change-Id: I9991635bf8b04925b6929b73abf659717639a78b
2 files changed