Make buttons to switch thumbnails work in detail view (bug 994822)