Sorry – just "don't" accidentally output stuff you don't want output. "Don't" forget to use Out-Null. That's the guidance. There is no way, aside from v5 classes, to design [a] script with reusable functions without running into the possibility [of] accidentally writing into output. PowerShell just doesn't offer any physical means of doing so. It's irritating sometimes, and it's something that v5 classes, with their stricter "return" keyword, address, but in terms of functions or the rest of the language, there's nothing you can do to address the situation. I'm not actually trying to be snarky – it's just that there's nothing to do, apart from "be really, really careful when you code."
Mostly because it's trying to be both a shell and a scripting language. Some of the shell semantics are really awkward for people who are thinking like a developer (and that's why classes, more of a developer thing anyway, behave differently.)