Another approach might be to use a single exception and some $IsNull statements.
Set the exception to match ANY of Custom3 has a value, Custom4 has a value, Custom5 has a value.
Then make a template that includes Custom3, Custom4, and Custom5, but instead of using just the tag, use this function for each tag:
$IsNull(<Tag>,,<Tag>)
That means that if there's no value in the tag, it will be skipped, otherwise it will be displayed where you've put the function.