crawlala.py: avoid infinite loops in course crawling

* problem arose in pages that were not document collections
* (i.e. grading pages etc)