Fixed #23583 -- More selectively ignored static/media roots

Fixed a regression introduced by 28efafa24c.
Thanks Michal Čihař for the report and initial patch.
I can test. Would it look like: `ignored_roots = (os.path.normpath(p) for p in (settings.MEDIA_ROOT, setting.STATIC_ROOT))`?