Fixes an error with restart. PR: 226937 Submitted by: Andreas Andersson <a.andersson.thn@gmail.com> Approved by: hrs (mentor, implicit)