The module.exists tool function has been broken by ticket #15339 and PR https://github.com/phpbb/phpbb/pull/4971
The results of the recent changes means it no longer checks if a module exists correctly. If a module exists, no matter what, it must return true. Currently, it requires a parent to be specified and to exist.
There are already extensions failing to install because of this, because supplying a $parent can be 0 or false, which with the current implementation now, always results in returning false, event though the module may clearly exist.
Related: Ticket 15544