Add tests and fix logic around affiliations retrieval

No idea, if not this is something we should raise and do.