Apparently, the "Creature Corrections" component of BG1 UB assigns a BG1 style portrait to Imoen's Candlekeep incarnation (IMOEN.CRE). However, it doesn't check whether another mod has already assigned a portrait to Imoen, which can lead to an inconsistency if the "Give Imoen her BG2 Portrait" component of BG1 NPCs has been installed beforehand. In order to avoid this, I'd recommend changing this code:
COPY_EXISTING ~%tutu_var%IMOEN.CRE~ ~override~ // Imoen (Thief, AR2600, Candlekeep)
WRITE_EVALUATED_ASCII 0x34 ~%tutu_scripti%MOENS~ #8 // Corrects Imoen's portraits
WRITE_EVALUATED_ASCII 0x3c ~%tutu_scripti%MOENL~ #8
PATCH_IF (SOURCE_SIZE > 0x2d4) BEGIN
READ_LONG 0x2b8 slotOff
READ_SHORT slotOff + 0x12 weap1
READ_SHORT slotOff + 0x14 weap2
READ_SHORT slotOff + 0x16 weap3
READ_SHORT slotOff + 0x18 weap4
// make sure the creature has no weapons
PATCH_IF ((weap1 == 0xffff) && (weap2 == 0xffff) && (weap3 == 0xffff) && (weap4 == 0xffff)) BEGIN
ADD_CRE_ITEM ~%tutu_var%BOW05~ #0 #0 #0 NONE WEAPON1 EQUIP // Short Bow
END
END
BUT_ONLY_IF_IT_CHANGES
into something like this:
COPY_EXISTING ~%tutu_var%IMOEN.CRE~ ~override~ // Imoen (Thief, AR2600, Candlekeep)
PATCH_IF (SOURCE_SIZE > 0x2d4) BEGIN
READ_LONG 0x2b8 slotOff
READ_SHORT slotOff + 0x12 weap1
READ_SHORT slotOff + 0x14 weap2
READ_SHORT slotOff + 0x16 weap3
READ_SHORT slotOff + 0x18 weap4
// make sure the creature has no weapons
PATCH_IF ((weap1 == 0xffff) && (weap2 == 0xffff) && (weap3 == 0xffff) && (weap4 == 0xffff)) BEGIN
ADD_CRE_ITEM ~%tutu_var%BOW05~ #0 #0 #0 NONE WEAPON1 EQUIP // Short Bow
END
READ_ASCII 0x34 ~ports~
READ_ASCII 0x3c ~portm~
PATCH_IF (("%ports%" STRING_EQUAL_CASE ~~) OR ("%ports%" STRING_EQUAL_CASE ~None~)) BEGIN
WRITE_EVALUATED_ASCII 0x34 ~%tutu_scripti%MOENS~ #8 // Corrects Imoen's small portrait
END
PATCH_IF (("%portm%" STRING_EQUAL_CASE ~~) OR ("%portm%" STRING_EQUAL_CASE ~None~)) BEGIN
WRITE_EVALUATED_ASCII 0x3c ~%tutu_scripti%MOENM~ #8 // Corrects Imoen's medium portrait
END
END
BUT_ONLY_IF_IT_CHANGES
Also, as indicated by the revised code, the file name for Imoen's medium portrait should be IMOENM rather than IMOENL.