fix reverese lookup gms logic detection

Logic was reversed so the entry is removed if gms is there and other
way round.
Credit: SlimRoms