Merged in latest from upstream, re-tested.