Implement https://github.com/joomla-framework/archive/commit/89d15271ac6e339657ca349d56226d550e94156c