"Warning 048: asset loop recursion" is a very sneaky bug! You must fix this.

You are using a special enumeration loop macro, documented here:
https://zorro-project.com/manual/en/fortrades.htm

The problem is that you are breaking / returning out the loop without calling break_assets. Either finish the loop or break using break_assets, and then return the required value.