Tracking down obscure error