add more checking of macro def syntax. fixes #5508