matcher.c: properly handle negative array indizes