Add support for sub select palettes mentioning legend names.

This PR introduces the support of sub select palettes like:
```
'metasubselectpalettes' => array(
	'field_two' => array(
		'value' => array(
			'legend_name_1' => array('field_three'),
			'legend_name_2' => array('field_four')
		)
	)
)
```

This support is present in MetaPalettes.php but was forgotten in the Builder.

This PR fixes some minor issues along the way (see commit messages).