More than likely you have a failed valve inside the tank. Federal regulations have mandated new, ever increasing laws requiring the car manufacturer to lessen the emission of gas fumes into the atmosphere. Thus, subaru has intergrated some system of recycling and venting the fumes from the gas tank back into the combustion chamber in order to burn them off and not have them released into the air.
During re-fueling there is a flap that closes off the vent lines so that they don't fill up with fuel. Also, there is a float(similar to the one in a toilet) that will cause the fuel handle from the pump to reset. This float is probably stuck in some way. Please refrain from "topping-off" your gas tanks as it can cause more CEL's than you care to know. Not only that, most technicians find it hard to learn this system and diagnosing is difficult because of all of the vent lines and valves required to make the system work.
My .02
DaBeagle