Distance was lost when storing/retrieving references to intermediate result container. Now all JUnit tests are again successfully passing!