Forgot password link takes user to the main network site

Hi, I recently stumbled across an interesting bug.

For a wordpress multisite installation, when the user clicks on the forgot password link, he/she gets taken to the main network site (the site with the id=1).

For instance i have site1.com hosted on mainsite.com if i go to site1.com/wp-login.php and click on forgot password, it takes the user back to mainsite.com/wp-login.php?action=lostpassword. Users that register on my network only have access to their sites, so it really gets them confused.

If i manually type in site1.com/wp-login.php?action=lostpassword it works ok off the custom domain. The e-mail sent also contains the name of the site1.com.

I am pretty sure this is an easy fix, that would save a lot of people a lot of headaches.

Thanks in advance,
Adrian