Fix EZP-21878: layout attribute lost when importing class package
(cherry picked from commit 3fa7ff90bfbedabecc83ba035e2533b2301261f9)