Prevent related products shortcode creating errors

Closes #6114