This is a follow-up to this bug, which was fixed with a short-term solution by this patch.
Related tickets: