Problem/Motivation
The Layout builder module does not protect against recursion. If a Block Plugin which renders an entity is placed inside the same entity's layout, you will receive "Maximum function nesting level" errors. This was originally reported in #2976152: Don't allow placing a Custom Block in the layout override for itself or a default layout, and is being mitigated in that issue by hiding known Block Plugins that cause this issue.
Proposed resolution
The mitigation is fine for now, but Layout builder should have higher level recursion protection, similar to what the Entity Reference formatter does today.
Remaining tasks
Write a patch and tests.
User interface changes
None.
API changes
None.
Data model changes
None.