The base units you guys and gals have put in upgrade perfectly to either the best mundane or magic weapon available. However, a designed unit (by me) using the upgradeable two handed pointy stick option, wouldn't upgrade from the first spear to the frost spear (first magic spear which is much better). When I got the civic tech that unlocked the boar spear (second worst spear), the units upgraded to that.
I'm guessing the check you're using is different in both cases, and the designed unit's check for better weapon is only looking at "piercing damage", rather than an overall effectiveness value (damage + specials, or something similar).