NEXUS-5971: alternative solution that mimics the original scanning 'is repository type a declared interface of the implementation' check at runtime