UV Overlapping driving me insane now

I’ve had problem when UE4 could not calculate second uv channel properly. The root of problem - different polygons were in same place and had same uv’s, so UE4 treated them like same polygons and have not “shuffled” their uv’s so they basically stay in same place and overlap.

Illustration of problematic mesh(8 cubes)

To solve this you have to manually create UV for Lightmass without overlapping.