feat(frontends/lean): force 'classes' to be declared before instances are declared, closes #228