To repro:
PS> function foo {}
PS> sbp -command foo
PS> foo
[DBG]: PS>> (@($availableModules | ?{ $_.SessionState -eq $null
>> }).Count
>>
>> ^C
Important to this repro - hit enter twice (so you have one blank line) before hitting Ctrl+c.
After doing this, the command line should be cancelled, but it isn't, and figuring out how to fix the error might be hard, it's sometimes easiest to just exit PowerShell at that point.