Another fix for foreach on Documents