BUG-7464: Fix StackOverflowError on hash collisions
If LNodes get saturated due to poor key hash function, the ListMap
chain can grow large. Since ListMap.get() was implemented using recursion
this can easily trigger StackOverflowError. The same problem impacts
ListMap.contains(), which is triggered in the add() path.
Turn recursion into a loop, which provides defence against the error,
while not alleviating the performance impact.
Change-Id: Id04d30b9cb4d75dc4535ff20bd11a16ed96ab0ff
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>