Update consolidation logic in escript.build