Yeah, it's unfortunate. One small workaround is putting new skills on the weapon itself (you could override _Spears and place the skills on there, and it'll be inherited by all spears). Then if the player was to use a different weapon, the skills would naturally be gone.
Taking this one step further, you could force memorization/unmemorization through scripting if a weapon other than a spear is equipped. You can check an item's base stats ID and type.