SEF wrong path - Revival of issue 1272 - proposed the fix

Here is a revival of an issue reported in Github

https://github.com/joomla/joomla-platform/issues/1272

See also bug tracker #33598
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=33598&start=0