`where.not` adds `references` for `includes`.

Closes #14406.