Revert "Fix breaking changes due to issue #7021"

This reverts commit aeef7aad83aaa24c503fa18e321d2271829f003b.