We're a small team of 8 and just recently (this week) hired a new programmer. We decided to go with the person who we felt would be the best fit for the team and most excited about learning, not the one who brought the most applicable skills coming out of the gate. We're at a point right now where the office is small enough that the wrong person, with the wrong attitude, could ruin the team dynamic.
I've worked in other organizations where the team was at a different point of maturity and could handle someone with a poor attitude so long as they could get the job done. In these cases, team fit was still an important aspect in hiring, but what we looked for, first and foremost, was the ability to quickly jump in on projects with little learning curve.
For me, there is always going to be some skills gap in new hires. Especially in fields that are extremely technical like programming and software development, every firm uses a slightly different project management process, a slightly different set of tools, and focuses on slightly different technologies. Being able to find new hires that will be able to work within the existing dynamic is sometimes just as important as their technical skills (within reason).