Remove old_flags variable, which is a duplicate of the flags variable.