(Issue 3551) Improve cache invalidation for indirect resource references