Extra tests for socket-binding expressions & mixed-domain

Supersedes #3804