Be less restrictive on FOAF definition, and fix bug in error recovery.