Fix possible collision in generated thumbnail cache key (#1489069)