Preserve top-level module IOs in C++ backend output

This changes only `findRoots`, which is sufficient to cause top-level IOs to never be trimmed from the C++ backend output.