Grumbling against a leader can really be a symptom of grumbling against the Lord, when that leader is a leader chosen by God to do his will, so when grumbling against a leader who is trying to do what the Lord has commanded him to do, you are really grumbling against God, as God is the true leader and the person he chose is just the messenger.
There can be cases where this might not be true, such as when a leader claims to be God or to take the credit for something that rightfully belongs to God. Some leaders are not sent by God and if this is the case then grumbling would not in any way be considered grumbling against the Lord.
Leaders tend to take complaints personally, because the complaints are aimed at them and most leaders tend to forget when they are constantly being blamed for things that may go wrong, that it is really the Lord who they are complaining about. Because of this they tend to take things personally and become angry or resentful.
It takes having and accepting the Lord as you leader and trusting him to handle everything. If the leader of a group of people has an intimate relationship with the Lord then he just knows and trusts that God will fix everything, through him. This is when he, the leader finally realizes it is definitely not about him but it is about the lord.