Synced with upstream gala changes.