"Speak not thou in thine heart, after that the Lord thy God hath cast them out from before thee, saying, For my righteousness the Lord hath brought me in to possess this land: but for wickedness of these nations the Lord doth drive them out from before thee."
I pondered what they were doing wrong. To think I deserve anything because of my righteousness, would take incredible pride and an absolute lack of humility. Sorta like when you think your humble, and that shows your immediately not any more. I pictured in my mind a totally holier than thou attitude. I can be as righteous as I want and that doesn't force anyone to lose their place. Losing your place, land or possession was totally the doing of the wickedness of the people there. The attitude that was needed was God is in charge and I am just an instrument in his hands.
One of the most important reasons they were to possess this land was because God had promised it to their fathers, Abraham, Isaac, and Jacob. I think what God is telling them is have a humble heart and turn to me. In all things acknowledge my hand in preserving your life, and having you prosper. God will have a tried and tested people, he can just as well take you out of where he just put you. This made me think about Job.
This also made me think of Elder Renlund's talk "Our Good Shepherd" in LDS General Conference on Saturday. He related the story of the Pharisee and the publican. This scripture stuck out to me.
"I tell you, this man went down to his house justified rather than the other; for every one that exalteth himself shall be abased; and he that humbleth himself shall be exalted." (Luke 18:14)
There is much to be careful about when a person thinks they are more righteous than another. All kinds of alarms should go off that I'm in dangerous territory.