Prevent A Star revisit visited node