bugfix flag is-valid: reset at second validation