Use Set internally within legalActions to deduplicate