Add bug fixes to imagemap functions

They weren't properly accounting for the differences between search
results, cached imagemap thumbnails & live thumbnails.