Check nodes for matrix output (fixes #267)