Such a document can be considered invalid. However, it would be good to provide functionality to handle it.
Update: After reviewing the case, we concluded that the issue is caused by the document being linearized. Therefore, this item is being marked as a duplicate. Please follow the related public item to receive notifications about future status updates.