Issue 341: generalize label selectors