more than likely it's the led.
Try a different led in the same position and see if it happens again.
i have seen led's do all sorts of weird things when they are being dimmed in the G.I circuits. probably would be better using the leds that are made for A.C. but i havent seen those led's dimmed yet so i don't know what they would do