Fixes regression in the cleanup
Merge pull request #4821 from yurydelendik/fix-loadfontregr

Fixes regression in the cleanup