Detect Displays sets default wallpaper I have ext. monitor connected to MacBook.
I use macbook with closed monitor most of the time, sometimes I need second monitor:   


I open notebook's monitor
call Detect Displays to turn on monitor
and after that my wallpaper on external monitor resets do default


How can I prevent it?
OS X saves unique wallpaper settings on a per-device (per-monitor) basis. The wallpaper setting you make when using only your laptop, vs. the wallpaper setting when you run the laptop in "Clamshell mode", vs. the wallpaper setting when you run with the lid open and external monitor connected, all have different wallpaper settings.

The solution to this problem is quite simply to run your computer in dual-monitor mode as you've listed, and configure your wallpaper settings. Now those specific settings will be remembered when you are running the same external monitor and built-in laptop screen configuration. Changes to this multi-monitor mode will not affect the other monitor configurations.