Consistent heuristic and A*
A* isn't finished until all nodes with $f(n) &lt; f(goal)$ are expanded.

So even though you have added $D$ to the open set you still need to expand $B$ because $f(B) = 11 &lt; f(D) = 17$ after which $f(D)$ will become $12$