Fixes #630

Changes the logic for tab selection.  Tested on webdev using these kit IDs:

kydnk (**verified** on quarterbarrel)
rqfnh (**not verified** on quarterbarrel)

which belong to the same user in the test DB.