Merge branch '2776_dir_selection_fix' into 4.8.1-stable