Used Neo4j's built-in LCS function.  Everything is better now.