Don't re-use debug level for flags.  Closes #839