My MK5 GT Sport diesel did some right funny sh*t before and during when the battery was dying, electrical stuff, replaced it and had no issues since. Take the battery off and kwik fit or halfrauds autocentre will test it for nothing to see if its duff or not, halfords checked mine and it was at 17% health whatever that means (it went flat during the MOT cause they left the lights on for a few minutes with the engine off even when i told them not to lol - still passed)
Also try get it scanned, even if you dont have vagcom ive got one of those autel £15 scanners off ebay that found my recent dead anti shudder valve problem, just make sure its obd2 and canbus.. mine only works on my mk5 but doesnt work on my mates mk4,, but oddly it works on a piece of sh*t 1999 citroen saxo !