mutt_score_message() purposely passes a NULL context to
mutt_pattern_exec(). The idea was to block slow patterns, and the
scoring documentation notes this by saying:
"For efficiency reasons, patterns which scan information not
available in the index, such as ~b, ~B or ~h, may not be used"
~X needs the context to parse the messages (during message scoring at
least), and thus isn't suitable for message scoring either.
Block ~X from being used when the context is NULL. Add ~X to the list
of patterns noted as unusable in the message scoring documentation.