Fix Register-ArgumentCompleter to work with dynamically created script blocks so that they can access functions like New-CompletionResult.