Andrew, Wiring could be upside down and backwards (which would be a double / double and I'm not talking cribbage), but grounds can be so deceptive. I have not monkey around with any of the wiring in the area you are working so I do not know what I am going to suggest is possible. Most will say a ground is a ground is a ground - but not always. In other words, if you ground a wire to the frame in the front of the Jeep, it should be the same ground at the frame at the rear of the Jeep. But now add to the equation a loose footed ground such as a trailer. There is such a thing as a 'differance in potential' in the matter of grounds. To make a long discription short, if you are able to directly wire a ground lead from your trailer lights to the ground lead used AT the brake lights (if possible). Of course leave these both grounded but this would eliminate the crazy ground issue. This may take a bit of jury rigging or adding several feet of a similar conductor wire (extra grounds will not hurt as long as the positives are not grounded).
For those unfamiliar with the term a 'differance in potential' in grounds it basically came from my 30 years of installing on premis communications systems for the defunct Ma Bell. The service (dial tone or data circuts) coming into a building often used an earthen ground at the building POP (point of penetration). Next, if the electroic equipment installed inside the building used a cold water ground, for certain types of equipment an obsucre problem would occure. Now the deflugulty above took place in high tech state of the art electronic equipment which is not what we are talking about here. However, wiring the darn grounds directly to each other will cut down / out the time of resolving the mystery of the trailer lights. My guess is upside down and bacwards, which of course would include a ground problem. Steve