BUG: Fixed a bug in DataFrame/Panel cache insertion and subsequent indexing GH4939

closes #4939