[core] Set local group policies using a thread with timeout

* Closes #392