Fix adding common server dependencies if there are more than one listene...

...r of same type.