Fix buggy blocks handling in the module parsing