More coding style changes to two of the union_* functions. LC_COLLATE=C
is introduced to allow globbing since we never want to parse ls.
Introduced a helper function for union_insert_modules as well.
Fixed merged conflicts from a rebase