Improve compiler error checking for the `[]/1` control construct