Re #2. Fixing bug in way completion flags are checked.