Class AssemblyObject has the protected field "entityRef" and public getter of the field. But these things are declared in the base class GObject too.
It could lead to some errors, for example, during the object cloning process (see AssemblyObject::clone()).
Delete these field and getter.