Fixed benign match error in assets caching

Backport to 2.3.x required.