Yes, you take armor damage because you are in combat. You don't take damage if your spider died, but you are still put in combat, and thus your armor takes the usual 1 point of damage every 10 seconds of combat time.
I agree this is not very realistic, and it would be easy to fix it. However, I am not sure whether it should be changed - I don't want that cave the leeching place of choice just because you gain experience without actual combat time (not even risking to die).