Fix logic error in upgrade unlocking code not checking for already owned upgrades properly