Fixes #4665 and #4666 If task is conditional do not flatten items list for packaging modules