There is an exception that allows a back (QB) to break the waist of a lineman and still be a back IF he is in position to take a direct hand to hand snap. If he lines up under a guard, then he doesn't meet that exception, and now he's a mugwump, neither a back nor a lineman, and that's an Illegal Formation foul if he is there at the snap.