def/class keywords after an opening parentheses led to empty arrays without closing brackets, tests & fixes #416