This fixes #7723.  The calculations now work.
More work on bug #7723.  I am moving the code to ActionVirtual.