Fixed a bug during testing this ticket.  Refs #7653.
Added some unit test (incomplete).  Refs #7653.