Fix another issue with generate layout inside Engine