No "solution" for this yet? I just ran into this issue myself. Very frustrating. ... Actually a little more research dug this up in case someone else finds this post first in the future.
http://k2underground.com/forums/thread/18353.aspx
HOWEVER, this really didn't apply directly to my situation. And what an annoying bug! Shouldn't K2 clean up after itself better? If these are "no longer needed" why didn't K2 clean them up to prevent this?
The scenario that affected me:
I had a Server Event (Code) in an Activity. Created a new Activity. Dragged that Server Event (Code) from the current Activity into the new Activity. Deployed. Error.
Also, I had a custom Build Configuration set, which after a little more experimentation I suspect was part of the culprit.
SOLUTION (worked for me): Set the Build Configuration back to "Debug" and Built the project. Then it worked and I could set it back to my custom Build configuration and Build it successfully too.