Fix synchronous loading in the presence of subdirs and .ipkg files