Re-rolled the patch for 9.1.x-dev , and fixed $modules as protected.