add more debug logging
be more conservative about trying to merge values[]