I have some new information from looking at the logs in my firewall. It appears that when Avast is set to pick up the proxy settings from IE, it does not do so. It makes the access through port 80 even though the port specified in IE could be 8081.

Hope this helps.