Hide thumbnails when empty. Closes #2409.