While the removed check in Templates.js in rP18977 indeed covered disabled resources,
it was also useful to ensure the resource order.
There might be other places where the resource order is incorrect. But after reading the resource agnostic commits in #3934 again, I can't spot any other issues easily.
There is no clear rule when we enforce the order (simulation? globalscripts? gui?).