The thing is that the offending script itself is generated and I don't understand enough of how things fit together to easily find the spot where you would need to fix it.
I won't have any real spare time to look into this until the weekend at the earliest. Perhaps grep for the offending line or raise an issue on the openwrt github?