The whole house fan is causing negative pressure that is sufficient enough to draw air back wards through the water heater vent.
If the heater is on at the time the flame is going out but it is taking a while for the gas valve, by way of the thermocouple / flame sensor, to know the flame has gone out and raw gas is going out into the room until the valve shuts. That is the odor of gas.
If just the pilot is on you will get the raw gas from the pilot being out but it is minimal and again only till the gas valve shuts.
Depending on air flow / direction it may be by passing the detector all together because the air flow is so strong.