Copy PR #1483 to current 3.x staging branch

Duplicate of outdated PR #1483 - https://github.com/joomla/joomla-cms/pull/1483