Backporting a fix from VIP.