See line 1369. The pattern is only detected if the goal is GOALflags, because the rewrite sets the flags correctly, but does not set the value correctly. Note that BT is a flags-only instruction.

It was not a bug because GOALvalue is inclusive of setting the flags.