It's also possible that the smartgun targeting system has a motion-tracking component to it as well, just like the sentry guns apparently do.
And even if the IR targeting system can't see the aliens, it should still see the marines with whatever IFF component it is that excludes them from being detected by their own motion trackers. That may prevent a lot of friendly-fire accidents (at least, those involving the smartgun).
Either way, I still think the smartgun is probably reserved for bug hunts and they have something closer to a modern SAW for stand-up fights.