According the the JLS specs the first module with name X should end on the modulepath. Due to a bug it is the last one.