Add async test for config flags.  Fix bug found by test.