Fixed canonical issue in SEF URLs

Fixes issue with canonical described here:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_id=8103&tracker_item_id=29319