I have been running into this bug across many machines. Here is what fixed it for me:
aptitude purge apt-proxy ; aptitude install apt-cacher-ng ; sed -i s/Port:3142/Port:9999/g /etc/apt-cacher-ng/acng.conf ; /etc/init.d/apt-cacher-ng restart problem solved! :-)