backporting CRM-15056