Synced to upstream (again) to fix a bug.