[backport] transformers no longer ignore UnApply.fun

Backports 7122560063 and 4133eb8454 from the 2.11.x branch
Merge pull request #3865 from xeno-by/topic/extractor-macros-210x

[backport] transformers no longer ignore UnApply.fun