In https://gerrit.wikimedia.org/r/#/c/269901/ ResourceLoaderWikiModule is modified to follow redirects for JavaScript/CSS in modules. However, cache invalidation is still based on the original page, and doesn't take redirects into account.
We should extend that patch so that cache invalidation for modules takes redirects into account.