If the patch I sent in this thread does not raise problems, I suggest we simply offer an option to let the user decide whether he wants the flags to be changed or not.
Please continue testing the patch and report any problem, I'll do so myself. -- Bastien