Fixes transitive dependency bug of already merged labels

@Squareys see commit message. Can you review? Maybe there is a smarter way to do that.

However, thank you to Marcel for reporting that bug.