Fix filbert_loose infinite loops

Incomplete class and function definitions could result in infinite loops
because they were missing eof checks.