ReferenceContainer: Fixed "no reference bug". It was a result due to asynchronous function calls.

getFiles was executed before getReferences could even get the references. Their common variable "References" was an empty array. Now getFiles is called after the "Reference"-Array is filled with the references.