The bridge function for liquid sodium at T5373 K is obtained by using the mean spherical approximation to extrapolate the pair distribution function ~PDF!, calculated in molecular dynamics ~MD! simulations, beyond the half simulation box length for two sizes of the MD system. The bridge function is found to strongly depend on the total number of particles used in the simulation cell. This dependency leads to a spurious maximum of the static structure factor at long wavelengths, obtained from the reference hypernetted-chain approximation ~RHNC! with the MD system used as a reference system ~RHNC-MD!. A simple self-consistent procedure, proposed to account for the finite-size effects in the bridge function, allows one to efficiently correct the RHNC-MD static structure factor for all unphysical manifestations.