When joining a subquery in a delete operation, the bindings for the "where" come before the bindings for the "join", causing the resulting query not to be what is expected. This could be dangerous ...
The original implementation in PR #11395 correctly counted related docs. But after PR #11923, the count subquery for join fields no longer includes the necessary JOINs.