Use the correct mesh data when building submeshes.

This fixes the requirement of applying generation modifiers before
exporting.