Fixed thread-safety for the internal thumbnail mapping.