fixed cachedpkg variable not reinitialized
tagged 3.4.6