Fix scope checking and handling of non-Arrays