Fix previousOwner bug

I encounter bug in my branch caused by wrong handling of previous owner in basic OXC.
As it is clearly wrong even in master branch, I push this fix there too.
You has already the   for(std::vector<BattleUnit*>::iterator;;)    loop in the line 259.
You can use it.