fix #4646, more helpful error for trying to call an array