Slight cleanup of Get-DynamicParametersForCmdlet code