HOTFIX: repair and enhance selection of sub-departments in item editor

Tested and should be FFed into master, from which it's based.