Fixes regressions introduced by #55325c49a72 and #723c356f1c8