InDesign SDK | Need help with hyphenation

As you can see in the screenshot above, first textframe (on the left) is hyphenating the word "Clean-cut" incorrectly. The text is written in a custom language which uses sample hyphenator plugin from "sdksamples/hyphenator".
The second textframe (on the right) is hyphenating the word correctly without double dashes which is written in built-in language "English: USA".
I wonder why the sample plugin is working incorrectly when coming to hyphenating the words with dashes in them.
------
Here I will leave some code snippets from that plugin and debug logs:
HypAdapter.cpp, HypAdapter::findHyphenationPoints function has this, maybe something is going wrong here:
// Scan the characters and selectively generate hyphenation points.
for (int32 i = 0; rWord.CharCount() > 0; i++, rWord.RemoveFirst())
{
Hyp::HyphenQuality hyphenQuality = IHyphenatedWord::kNoHyphenPoint;
switch (rWord.First().GetValue()) {
case kTextChar_HyphenMinus:
case kTextChar_UnicodeHyphen:
case kTextChar_FigureDash:
case kTextChar_HorizontalBar:
case kTextChar_EmDash:
case kTextChar_EnDash: {
hyphenQuality = IHyphenatedWord::kHardHyphenPoint;
break;
}
case kTextChar_DiscretionaryHyphen: {
hyphenQuality = IHyphenatedWord::kDiscretionaryHyphenPoint;
break;
}
case kTextChar_Solidus:
case kTextChar_ReverseSolidus:
case kTextChar_Ellipse:
case kTextChar_FlushSpace:
case kTextChar_EnSpace:
case kTextChar_EmSpace:
case kTextChar_FigureSpace:
case kTextChar_PunctuationSpace:
case kTextChar_ThinSpace:
case kTextChar_HairSpace:
case kTextChar_HardSpace:
case kTextChar_ZeroSpaceBreak: {
hyphenQuality = IHyphenatedWord::kUnpreferredHyphenPoint;
break;
}
}
if (hyphenQuality == IHyphenatedWord::kNoHyphenPoint) {
continue;
}
hyphenationPoints.push_back(Hyp::HyphenationPoint(i, hyphenQuality));
}From logs, I can see this:
HypDiagnostic:TraceHyphenatedWord("Clean-cut")-->In
word(ascii)="Clean-cut"
nNthPoint, hyphenIndex, hyphenQuality
0, 5, 90
hyphenatedWord="Clean--cut"
HypDiagnostic:TraceHyphenatedWord()-->Out
Will be waiting for your response, thanks!
