Manual re-add of PR #395