I am trying to define a function in a template, but sometimes the template is called twice. I tried

```
<cfscript>
if (not isdefined("tested"))    {

    string function tested(required string component) output="false"    {

        if (arguments.component CONTAINS "internal") return 'N/A';
    ....

 </cfscript>

```

But I still get a

![enter image description here](https://i.stack.imgur.com/oQwbR.png)