Apologies in advance if this has been reported before.
In the velocity template attribute-release.vm, I am under the impression that the #foreach ($value in $attribute.values) line yields all the values that the underlying InputDataConnector for that $attribute has returned, and not just the sourceAttributeID. This happens when the InputDataConnector uses allAttributes="true".
Using allAttributes="true" is what I suspect most people will want to do when transitioning to 3.4. But I may be wrong.
So the sourceAttributeID is not being respected when it comes to the velocity template. To be clear, the aacli and whatever tests I did with SPs seem to indicate that the SAML assertion seem okay and do not seem to suffer from this bug, naturally.
A workaround that I've discovered works, is to remove the sourceAttributeID from the attribute and use an InputDataConnector with specific attributeNames. In that case, I think it works okay.
But I would respectfully submit that this behaviour is unexpected and the sourceAttributeID should be respected, albeit it is marked as deprecated.