The question on stackoverflow was regarding the second question. One link with two rel attributes, one invalid ("sunshine"), one nofollow. Html5 spec dictates that the second (valid nofollow) attribute must be ignored, thus leaving the link dofollow.
Background for the second question was that I have seen instances where I entered something like My Site in a blog comment and the site just added the rel="nofollow" attribute, withour removing the existing one.
Regarding the first case, it may not be so easy than one would just "think". For example, it is already known that for same links on the same page, only the first anchor text is counted.