WICKET-5124 Improve ResourceReference#getDependencies() API