Forward port WLB changes from xs64bit-ring3