luci-base: fix dependency handling of optionals (#645)