It seems that nearestObjects can detect ammo objects, but it can't detect their parent classes. So I guess that's a bug, not a feature. Meanwhile nearObjects and nearestObject commands work.
E.g this returns the missile objects:
nearestObjects [_pos, [], 3];
but this doesn't:
nearestObjects [_pos, ["RocketBase", "MissileBase"], 3];