//check for parent section when entity is null
//this happens when AbstractUnboundEntityCollectionSection is used
- if(entity==null){
+ if(element==null){
if(parentElement instanceof ScopeSection || parentElement instanceof ScopeRestrictionSection){
element = new ScopeElement(this,
parentElement,