fix ugly nested errors when @mattbasta's code blows up (bug 829235)