fix merging 3 and more resources with equal name

I've had an issue while merging some similar pages into the single page. The images were fine, but the text in the small pages was totally messed. So I've traced down this error to the PageObject._mergeResources method.