Being AC, it does not know the direction of current flow, so if it exceeds the rating, it will trip. DC on the other hand has a polarity not because of the current direction, but the direction does affect which side the spark shroud is on. On the wrong side, it catches fire.

In Hybrid systems, there is a CT which measures the load current, and a CT which measures the supply current. It then subtracts the one from the other, and knows the amount of current the loads are drawing before the inverter. It then starts applying the feed back to the grid side, until the mount becomes zero(if there is sufficient PV power to do so).