Do not set customRepository for EmbeddedDocument

Fixes #837