compiler/libec: Reordered global instances deletion
- Deleting in reverse order than creation to solve tricky reference issues