cli package fails to search for global flags when we use many level of subcommands. This PR uses context.IsSet() instead.