IIRC some KUL gates have the x-ray machine well inside the departure area away from the gate entrance, whereas others (at the end only?) are at the gate entrance.
Having xray twice is nothing new. AKL does this for flights to US with second x-ray at the end of the pier. And check-in for flights to SIN has xray which includes carry-on, plus the usual xray makes twice.