Thank you, jssaab for the incredibly prompt response.
The DI was replaced with a new one. I also might mention the following things the dealer said at the last inspection. I am not sure if they are relevant (the check engine light was not on at the time of inspection, so they could not test the codes then).
1) Cylinder head gasket is leaking
2) Crank vent hoses spongy
I am not sure how to check for the leaks you mention, but I will do some digging around.
The change of behavior with refueling is erratic. Some times the light comes on after a refill, sometimes nothing happens. I would monitor it more closely now that you mention a possible gas tank leak. Should I replace the gas cap with an OEM one?