I think that for better or worse, people do assume that something is wrong with you if you have been in a postdoc for a long time, even with a good record. They assume you have tried and failed on the market, when in reality you might have been tied to your postdoc location for a while (e.g. spouse in a 4-yr medical residency, 5-yr PhD, etc) and you're just now trying the market for the first time, and/or you have been picky about where you wanted to take a faculty position, possibly for location (e.g. family) reasons. In certain locations, there are NO jobs for years on end so waiting is your only option. That said, that is pretty easily addressable in a cover letter.
I think that one thing is for sure — a long post-doc will eliminate yourself from consideration at schools with a teaching emphasis or teaching-research balance, unless you teach during your post-doc and/or perform a very substantial amount of mentorship of undergraduate students. I know that most SLACs would see a long postdoc and assume they're a back-up option for your R1 aspirations, and will eliminate you from consideration (there are enough good people in the pool who want to be at a SLAC as their first choice, who have enough research experience to run a lab with undergraduate students.)
So if you do a long post-doc, know that you are truly aiming for R1 schools. In which case, I think it's imperative that you get grants. If you're R1 material and you are so many years post-PhD, you will be expected to have had time to build up your program such that it is now bringing in money (NRSA counts). If, on the other hand, you would be happy at a SLAC, regional university, or R2, make sure that you talk to your supervisor about having some time off (i.e. going to 75% pay) so that you can teach a class. Also and of equal importance, make sure that undergrads are involved on your work each semester, and that they co-author manuscripts (grad students are also ok, but undergrads will carry more weight certain places). You should have several student research assistants per semester, if you can keep up with mentoring them well. If you hate doing this then maybe it's R1 or bust for you, and even then, remember you'll have grad students to mentor. Mentoring students in your postdoc is excellent preparation for a professor position at any institution type.