This seems to happen only with enableDirtyTracking=false. When it is changed to true, the test passes.
Luis Barreiro, please take a look at this.