Merge "diag: Update boundary check for UPD session array index"