Debugged shiftWithAlignmentRec.