Remove some inaccessible branches and ensure that gflags is included in
the dependency list.