Fix EZP-23257: fatal error when instantiating a "related object" survey question from cli / rest context

(cherry picked from commit 1d5fb6d6453a1c739dadc7d05c93446bf5a129ec)