bug 879899 fixed display issue with with repeat select, and added tests ...

...for function at fault