Fix an infinite loop in fixup