Fix failures during unit tests in cases where $element is empty (and end of stream).Abstract: During the AppointmentTest::testAlldayEncoding test this fix is needed. . We might, as well, have a faulty fixture that gets loaded by this test. But this is for upstream to decide.