Slightly change how a new path is started, this is less hacky and somehow solves a crash.
Do not crash if we do not have any layers to process.