[Debug] fix ENT_SUBSTITUTE usage
bug #12555 [Debug] fix ENT_SUBSTITUTE usage (nicolas-grekas)

This PR was merged into the 2.6 branch.

Discussion
----------

[Debug] fix ENT_SUBSTITUTE usage

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

58476e1 [Debug] fix ENT_SUBSTITUTE usage