MDL-44316 upgrade: fix to ensure upgraded and new installations having matching 'tag_instance' tables