Fixed wrong class cast in TypeReference.getBoundTarget()