Synced with the source at 2c0a59b28eef4361b94c429be8552c5abdddaf31.