WICKET-5595: copy list of resources, because it is modified inside the loop