Led's operate the opposite of normal electronics. The higher the voltage the more current they draw. The cheap LED's won't take much over 12v. When your inverter is on you are probably feeding them well over 13 volts. When I converted my coach I installed a dropping resistor on each fixture. You can of course just buy the more expensive LED's that will accept a wide range of voltages. And yes you were correct in the wiring LED's are polarity sensitive and will only operate one way so that was not your problem. Most of the more expensive LED's are not even polarity sensitive. In this case you get what you are willing to pay for.