Forward-ported #525