Sounds like you installed some 2-wire LEDs? (all of the small ones that I know of are 2-wire, as opposed to 3).
Due to the way the OE wiring is, the the polarity of the parking light and turn signal wires flip flops whether the parking lights are on or off. It actually has nothing to do with whether your headlights are on or off - just the parking lights (which happen to be on when the headlights are on). You can make the LEDs work correctly with a little soldering, some wire, 560 Ohm resistor, and 2 rectifier diodes.
Basically, find the parking light wire. Solder in the 560 Ohm resistor and then the diode. Then, solder in the diode on the blinker wire. After the diodes, combine these two wires together and what you get will be the + wire to the LED. Then, add a ground wire to go from the - side of the LED to the Jeep, there it's the body, frame, or a splice into a common ground.
The resistor will reduce the output of the LED by about 1/2-2/3 - which is still actually pretty bright. This will be the parking light setting. The LED will then come on full power for the blinker.
12 JKR 2 door, MCE Gen III Flares, Teraflex 1.5" Perfomance Leveling kit, 35" MTRs, ARB bars front/rear, ARB diff covers, ARB Dual Compressor, AEV DOT-compliant beadlocks, Warn Zeon 8
97 TJ, MCE fenders and flares, heavily used and reliable on 35's.