Two's company: Ben Affleck was quick to congratulate Leo at the star-studded bash