I think you're right. I was leaning more toward getting another lens first because I am finding myself being very limited at times when I want to shoot something that is not really close.
As I was typing this message, I saw a rabbit in my yard and had to go outside and chase it around to try to get a good picture. But I could never get close enough, as usual. So far, I haven't encountered any problems with my camera body.
So a lens it is! I just want to make sure that whatever lens I get will work with both my D40 and the future camera body I get (probably a D80).