Fix #82. Support 'as' bindings in select. Improve tests accordingly.