Fixed printing and flags behaviour after cloning
The MR fixes trivial py3 print vs print(). ATR-20994 But also fixes genuine error in the behaviour of cloneAndReplace for flags. The "dynamic" flags were not cloned. As a side, I have changed the % string formatting in the flags diagnostics to the py3 compliant version.