Also add checks for cases where negative cycles exist but are not marked to protect against future shortest path function additions.