I don't think this is the best solution, indeed it should be a way to avoid doing this always. For instance, setting $webAdminMod->changed() before calling save. Take into account, this save produces a fork...

Have you tested remoteservices restart works as expected?