PIM-3196 Prevent duplicating history templates