getSubComponents was erroring on AttributeDictionaries, so added check
that Entity was Drawingelement before trying to access layer