Work towards bug #7948.  The difficult virtual endpoint average routines now work.