Indeed. The bytecode enhancing was not really working in 4.x.x and all fixed came into 5.0.0.
I think this issue should be resolved by fixing the default dirty checking mechanism.