6fbc7e7864
The previous solution used a flag, but it didn't persist across preparation cycles. This solution checks this.effects.applicationPhase directly. If phase is 'initial' or 'final', it means effects are already being applied, so we skip the super.prepareEmbeddedDocuments() call to avoid the 'phase has already completed' error. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>