[Debug] fix #10313: FlattenException not found because of https://bugs.php.net/42098
Merge branch '2.3' into 2.4

* 2.3:
  [Debug] fix #10313: FlattenException not found because of https://bugs.php.net/42098
Merge branch '2.4'

* 2.4:
  [Debug] fix #10313: FlattenException not found because of https://bugs.php.net/42098
Revert "bug #10817 [Debug] fix #10313: FlattenException not found (nicolas-grekas)"

reverted in 2.5 as it does not make sense here.

This reverts commit c18bf19016cc96dcf1604c0a5c97b647c78cb63d, reversing
changes made to 585b61db95dd63f8d048648384f5243320a44847.