Guess #1: your Pectineus is hurt so it doesn't want to work too hard; during single leg squat it would be working hard at mid-length to keep you in proper form, but if it went into further contraction it could still get the job done with less stress to itself - a Pectineus in full contraction would show extra hip flexion and adduction which sort of describes the 'twisting' your mention. Fix the muscle pain.
Guess #2: your gluts are weak; do hip hikes - right foot off a step, dip right hip then raise hip keeping left leg straight; do single leg squats assisting with arms until proper form is achieved (a cool way to do this is using a pull down machine, grab the bar and use the stack to 'unweight' you; lessen the weight as you improve) -