fix(library/module): module index assignment

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(library/module): module index assignment