Merge "Fix bug in dynamic BCE. With regression test."