This is another fork from !3984 (merged). For the rationale behind it see: !3984 (comment 353126544).