A thousand years ago, we were approached by a client who insisted on writing some software in MS BASIC (yep, I did say a thousand years ago), but wanted us only to debug it.
Since I was the only one writing software at the time, I said either WE'LL write it, or nothing. I made it quite clear I wasn't going to do anyone else's debugging.
Sure you lose a job, but that one? I think we did well in dodging that bullet.