Remove deprecated endif() and endforeach() arguments