I have exactly the same problem on Joomla 3.6.0 and Joomshopping 4.12.2. When I switch language on the product page it redirects me to the category page.
I tried the code above - doesn't work.
I tried switching SEF off - doesn't wok either.
I need to fixt that problem urgently and would really appreciate the help of developers here.