Matching one branch of a multi output pattern

Hi I am having an issue with matching a pattern when some op within the pattern is also branched out of the pattern.

For example:

  A
  |
  B
 /  \
|    |
C  D

I want to match the sequence A-B-C If I try to match this pattern it won’t match it.

Any idea why? Thanks.