The inverter charger is supposed to have two different grounds: i) when you're on shorepower, and the AC circuit is Inverting, the gound is supposed to be the boat's system; However, ii) when you're on shorepower, it's supposed to use the shorepowers ground and NOT connect with engine's, batteries', or seawater as a ground.
I dont' know if you had some work there -- or if the wiring for the shorepower GFI is somehow implicated?