EZP-20508 - Fixed warning in module redirection

Replacement of #598.
Simpler

@pedroresende can you please check with this patch ?