Reverted 697ce69b398c4776f46e986e30480eeff4766959 (see #3804).