Quad flips immediately upon guided/takeoff command (pixhawk 2.4.8)


My quad flips almost immediately after I issue guided/takeoff command.

I am following the X configuration as shown here: ardupilot.org/copter/_images/MOTORS_QuadX_QuadPlus.jpg

Looking to the front from center of the Quad:
Motor1: Top-right (counter-clock wise props)
Motor2: Bottom-left (counter-clock wise props)
Motor3: Top-left (clock wise props)
Motor4: Bottom-right (clock wise props)

The Motors1 and 4 lift up together and flip the quad up-side down. Motors 3 and 2 stay down almost touching the ground.

Frame: QUAD
Pixhawk1 002C001A 3337510D 31313639
ChibiOS: 57801550
ArduCopter V3.7-dev (1c3d90d8)

I am using V3.7-dev just so that I can do BLheli32 bypass to configure the 4in1 ESC. I am using Dshot_150. All documentation says that there no calibration needed.

Please let me know if I am doing something wrong.