What is your Shotcut version (see Help > About Shotcut)?
25.08.16
Can you repeat the problem? If so, what are the steps?
Add a .mkv with 3 audio tracks encoded. Add this as a clip to the timeline. Detatch each audio clip track to a shotcut timeline track. Press control Z to undo. The first one seems to work, but after that, any additional undo detatch tracks generates a new video clip and inserts it at the end of the current video track, also moving the playhead, rather than reattaching the audio to the original video as a track.