I know the problem you are talking about - it has bitten all of us.
The new language mode you use when writing classes in PowerShell shifts the needle more towards programming semantics than shell semantics and addresses this.
Give it a try!
Jeffrey Snover [MSFT]