Fix bug when a layout extension detection would not work