fix FS#932 - Library item with attribute definitions: attributes created on wrong / invalid layer