Fix from CMS (https://github.com/joomla/joomla-cms/commit/6fb99072a6cb6462501f80da21cffc50104c4313)