For resource loading we won't always have a class loader, so we need to check for that case. (FELIX-1193)