3.0 matching fixes

Fixes #5463
What does this solve?