fdo#73986: Don't forget to receive returned object from for_each.

Change-Id: Ia4ccb83c45ea3ce72a8e5c62a560ab1802bb2441
fdo#73986: Write unit test for document statistics.

Change-Id: I8ff51fda91627b365cf71be8849d07b92b447ba9