Dovid told Shlomo to kill Shimi ben Geira because he was מורד במלכות.
The problem is that at the time Shimi started up with him, Dovid wasn't considered a king. The Yerushalmi says that at this time, for a sin he would bring a female goat like a regular person and not a male goat like a king!! So how could Shimi be a מורד במלכות??