How would this be a security breach? Upset immigration officers yes. Upset handling agent yes. Maybe some illegal aliens entered the country. Maybe some toursist don't have the required stamps. But other than that?
Aircraft from Myanmar diverts to Langkawi due to bad wx at destination Kuala Lumpur. Not all pax pass through immigration. On the subsequent flight to Kuala Lumpur the pax are all handled as domestic. Where is the security risk?