bug fixes to the method which controls the generation of thumbnails, so specific edge cases where the element which triggers photobox is bound to a thumbnail image which is a not a child of that triggering element.