Fix logic errors in AvoidAlias rule by JamesWTruher · Pull Request #1251 · PowerShell/PSScriptAnalyzer

@JamesWTruher

The first fix is that after the yield return, we should move on to the next command
The second fix is that if we find _any_ command, we should not move on to the 'Get-<command>' variant
These changes mean that we do not run a pipeline (twice!) to find something that was a cache miss. In the pathological case of a script mmade up of only unique aliases, we would run 2 pipelines for each found alias.