It's not clear to me why you needed to widen this return type to `BeanMetadataElement`.