Fix crash on modules without module declarations
Improve ConditionalDeclaration