Hi Trixt0r!
loader.findReferencesByFolderName("foldername") first returns the references from the folder, then a null and after that all other references (not in the folder that I choose). I don't know if it's a bug or a feature :)
Thanks again for your work!