Fixes quick actions add label when adding a label which name middle
word overlaps with another label name: for example adding "A B C" when
also label "B" exists.
With the fix only the label "A B C" is correctly added, previously
also the label "B" was added due to the middle word overlaps.