bugfix for //loc[predicate], added regression test