I think is the compilator, in this context of compilation which generate an error because the variable $module_result.path.1could be empty, so when I try with the debug output I haven't errors because the variable $module_result.path.1 is set but in the compilation it isn't set.