Why mapmatched edge is not match with closest edge in query result

I am feeding into map matching algorithm 3 points, where last point is duplicated. Result a bit confusing. I am expecting get exact same edgeMatch and QueryResult for 2 duplicated points. Instead I am getting for intermediate point EdgeMatch in positive direction and closest edge for query result in negative direction, which is confusing.
Is it a bug, or expected behaviour?
input:
trk>GraphHopper MapMatching
trkpt lat=“53.44522” lon=“-2.15824”>2020-01-29T10:34:24Z
trkpt lat=“53.44516” lon=“-2.15765”>2020-01-29T10:34:24Z
trkpt lat=“53.44516” lon=“-2.15765”>2020-01-29T10:34:25Z

output:
trkpt lat=“53.445183” lon=“-2.158331”>
trkpt lat=“53.445167” lon=“-2.158079”>
trkpt lat=“53.445141” lon=“-2.157657”>
trkpt lat=“53.445125” lon=“-2.157402”>
trkpt lat=“53.445104” lon=“-2.15719”>
trkpt lat=“53.445125” lon=“-2.157402”>
trkpt lat=“53.445141” lon=“-2.157657”>

edge:50921 90133-90186, extensions:[GPXExtension{closest node=137632 at 53.44517809052255,-2.1582475151340232, incomingEdge=137632->90133, outgoingEdge=137632->90186}]
queryResult: 90133-90186 53.44517809052255,-2.1582475151340232,NaN

edge:50922 90186-20546, extensions:[GPXExtension{closest node=137633 at 53.44514104666394,-2.1576533491289296, incomingEdge=137633->90186, outgoingEdge=137633->20546}]
queryResult: 20546-90186 53.44514104666394,-2.1576533491289296,NaN

edge:50922 20546-90186, extensions:[GPXExtension{closest node=137633 at 53.44514104666394,-2.1576533491289296, incomingEdge=137633->20546, outgoingEdge=137633->90186}]
queryResult: 20546-90186 53.44514104666394,-2.1576533491289296,NaN