Not only that. Friend-or-foe identification can boil down to "only targets shooting at me are hostile". That policy isn't any good for human soldiers but robots operating on that principle could avoid a lot of collateral damage.
And those that shoot at allies. And those that haven't shot yet, but are aiming in the wrong direction. And those that are just reloading their mortar. And those that are setting up an explosive trap for the robot.
There are a lot of ways to be hostile that go beyond firing a weapon directly at the robot, and if it can't handle those, it will be exploited by humans pretending to be harmless.
I'd say that's sarcastic, but I sadly expect such reasoning from much of the US military leadership these days.
That reminds me of a classic scene from the original Robocop: