Checking for duplicate states on Closed performs the same function more efficiently (O(1)).
So we can eliminate the call to OccursOnPath from Expand:
Expand(u)
children = {}
for each move ∈ moves do
child = move.doMove(u)
if child ≠ null // and not OccursOnPath(child, u)
then d[child] = d[u] + 1
pred[child] = u
add child to children
return children
Note that some (and perhaps many) of the states returned by Expand will simply be discarded by the enhanced Search.