[Olena-patches] 1901: Fix adjacency test in p_graph.