[BZ-1174563] fix packages attribute for kbase when using a wildcard

(cherry picked from commit 56155b2b3017f519ad7a064fa93a4d942b8aab8a)