When an increase in residential density pursuant to N.J.S.A. 40:55D-70d(5) (known as a "d" variance) has been permitted, developers shall be required to pay a development fee of 6% of the equalized assessed value for each additional unit that may be realized. However, if the zoning on a site has changed during the two-year period preceding the filing of such a variance application, the base density for the purposes of calculating the bonus development fee shall be the highest density permitted by right during the two-year period preceding the filing of the variance application.