added a safe guard when looking up an error type library reference
within the same library without looking in the with package clause.