opencv: patch to fix multiple unsequenced modifications