gdi32: Only store the path in the DC when it's closed.