Fix build (remove un-used code from an earlier cherry-pick)
Revert "Performance increase in thumbnail handling"

This reverts commit 28498efb41f67836083534f6769d9d33e61c5467.