0004424: There should be possibility to extend same class more than one time in one module. Reverting some changes because of legacy modules support. (cherry picked from commit fcbb0ec)