Merge "Fix negative array size checking"