invalidate the subtype_cache when removing a subtype

If the function remove_subtype is called and in the same run you ask for the subtype id of the removed subtype you'll still get the old id.

This is a problem which doesn't appear often (if ever) but still it's a bug