This patch conflicts with the patch from #2940605 issue. Patch from #2940605 fixes recursive rendering issue globally.
There can be a case when the block is rendered inside the same block.
For example, we faced it when Block content has himself as a children in the render tree.
Node -> Paragraph -> Block content -> Paragraph -> Block content.
Also Block content can reference on himself
We are able to to create a block inside the same block and block field formatter has to prevent recursive rendering.
Actual result: 503 error.
Expected result: Page is shown.
Right now core does not restrict referencing to the same entity (see entity_reference field) but field formatter 'entity_reference_entity_view' (see \Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceEntityFormatter) has recursive rendering protection (limited to 20) for avoiding infinity loop and fatal errors.
Use recursive limitation similar \Drupal\Core\Field\Plugin\Field\FieldFormatter\EntityReferenceEntityFormatter in \Drupal\block_field\Plugin\Field\FieldFormatter\BlockFieldFormatter.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This patch conflicts with the patch from #2940605 issue. Patch from #2940605 fixes recursive rendering issue globally.