✅ Compiler limitation or is this logic wrong? - C#