Select colour malfunction

This doesn’t always happen, but there has been a few files where using the shortcut:
Ctrl+Shift+A for selecting color, for some reason it also select the pencil outline (which is not even the same color, its black with a different color ID) and so when I select the new color, the outline also changes.
I found that if i ungroup them all this doesn’t happen, but I don’t really understand why. Is this a bug in the file?

If you have cloned a color and assigned a different RGB value to the clone
and stored it on another palette also loaded in your scene this could happen.

To fix it, remove the cloned color and replace it with a new color pot containing the same RGB value as the removed color. You will need to repaint everything that was originally painted with the cloned color to be safe.

It’s definitely not a cloned colour, because cloned colour would have the same colour ID, but this is not. and if this is the issue then by ungrouping would not have resulted differently.

Which version are you using? Are you on Mac or Windows?
It doesn’t happen when I do it.

If you have a project where you can reliably reproduce this you should send it
to support for analysis. Alternately contact them to have a look on your system when you can reproduce the behavior.