Use the long format of the current wallpaper when calling set_index
* make sure we allow the index to be set when recursive walk is enabled
* make sure we release all locks even if we fail inside the lock