Fixed dangling [ when trait is not added or if no own var is defined