I ended up adding the following after line 115 in ArticleCrossrefXmlFilter.inc.php:
$personNameNode->appendChild($node = $doc->createElementNS($deployment->getNamespace(), 'affiliation', htmlspecialchars(ucfirst($author->getLocalizedAffiliation()), ENT_COMPAT, 'UTF-8')));
Seems to work.