Fix for keyboard navigation, when wrapAround is used.

Wrap around option is working only for mouse navigation. This fix allows to wrap with keyboard next/prev keys when first/last image is active.