Ensure enough images are preloaded

Seems like rel.lastItem can be less than rel.activeItem So we pick
max of the two values.