Multiselect - problem in labels with spaces

When labels for multiselect items have trailing spaces, the value in the field is not interpreted correctly. Selected options are not recognized as such, so they get deselected.

While writing a test case, another small issue in the widget width computation has been spotted and fixed.