Log warning if apply rule does not match anywhere.

Fixes #5911
Fixes #5957