Good Afternoon and Welcome to the Forum -
That is somewhat of a difficult question. Nearly 2 years ago, I went from the K20 (same sensor as the K7) to the K5. It was a very positive change in terms of dynamic range and sensor noise. As you have noted, it comes down to glass. If you went with the K5, what lens would you be using? And what type of photography are you interested in?
In the same situation - I think (knowing what I know now about the K5), I would be very tempted to go with the K5. It really is that much better - in my opinion. I use a lot of manual lenses and that does hold down the cost of glass. Even with limited glass, I would go with the K5.
The only exception would be is - if I were ONLY shooting is bright sunlight - no nights, evenings, etc. The difference in noise between the two bodies is substantial.
hope that helps,