Interviewer - "We checked the source code cited, and your name isn't on it?"
You - "Thanks for checking the source code, that was work for hire, so it's owned by the company I wrote it for, so while I'm disappointed my name was removed from the source, they own it so they decide, I can cover some of the features if that would help?'
The above shows that you clearly understand work for hire is owned by the entity that hired you. You expressed your personal opinion while remaining professional about what happened, and providing a reasonable way to prove you at least understand the code.
If they go so far as to say you lied, then do you honestly, really, want to work for them? Do you want to be dealing with them when you submit your bill?
If they approached this more professionally and said something like 'Oh we could see how that could happen, maybe you can describe the challenges in that software and the solution' then you should be able to convince any reasonable person that you at least grok the problem, and explain your solution.
They can then follow up with another question, and you've avoided the pain.
We've all had interviews where the interviewer was just an incredible jack-ass. They may be intimidated by you, they may be just an incredibly insecure person or having a terrible day and acting poorly. The best way to act if at all possible is always to be professional. Give your answers, they can take them or leave them.
Remember this part if you remember anything. You are interviewing them just as much as they are interviewing you. Yes you have to pay your bills, and feed yourself (and possibly your family), but don't go into this from a position of weakness. You are a valuable commodity, and it's their job to convince you to decide to spend the finite allotment of time we have during your lifetime working for them just as much as you may want the job.
Many technology professions and engineers are uncomfortable with negotiating. Don't be. If everyone in IT could learn that one lesson, that being hired whether it's contract or full-time is a negotiation goes a long way.
If you are dealing with a less tech-savy more 'business' orientated person you will win points (even if grudging) that "Damn this technology person can actually negotiate and isn't a nerd who would work for star-trek lunchtime showings"
If you are dealing with a more tech-savy person they probably won't be focused at all on the business side of things and you can discuss shop talk - discuss honestly some 'pain' (without dissing any company or individual) and often you can throw in a small amount of humor. When interviewing for a technology position it's a big plus to meet a candidate who can admit things that were tried that were disasters that they worked through.
If the interviewer has any scar-tissue at all they will understand you have been in the trenches and had things go wrong, and you can explain how you worked around it. The solution may not have been pretty or elegant but it got you and the company you were working with through the problem.
Someone who can think of their feet, evaluate what's going on, make a decision and adapt to save the ship is worth a ton. There are so many people in technology who search for silver bullets and are so enamored with X, whether it's hardware or software architecture that showing this helps hugely.