Fix crash with directive directly after imports