Here's a patch that should clean up these runtime dependencies. It's a bit specific to this particular case, but I think that might be fine for now. I think it would make more sense for native inputs to not have their paths included in LIBRARY_PATH. Does it even make sense for them to be there? I thought LIBRARY_PATH was for compilers to find dependencies when compiling so they can link their output binaries against them. Having native inputs show up there seems wrong. I'm in the process of rebuilding Java from icedtea-8 upwards to check, but I have already tested that modifying openjdk 9 and 10 leads to "guix gc --references" show that openjdk 10 does not depend on openjdk 9. I have also tested that I can run some complex Java programs on my machine using the openjdk 10 built using this patch. Carlo