Top, I am not sure of what you are wiring exactly but here is what I know since I recently did mine. At the hitch, the diagram is this:
From the connector to the first plug set
Pin 1 (Electronic Brake)- Red
Pin 2 (Ground 12-)- White
Pin 3 (Left Turn)- Yellow
Pin 4 (Tail Lights)- Brown
Pin 5 (Power 12+) - Blue
Pin 6 (Right Turn)- Green
Pin 7 (Reverse Lights) - Black
I honestly think you have the wrong wiring schematic. PM if I can help anymore.
Also, if you are wiring in trailer brakes you need a separate wiring harness that connects under the dash. You will see a white female plug that is where you plug it in after you connect to a brake controller. I got that harness from here
www.xterraparts.com.