Reimplement SetupSequence
to make it thread-safe
#476
Merged
SetupSequence
to make it thread-safe
#476