small changes to DatalogUnfolder