TST: Add test case for 0.12 regression with loc from GH4825