fix bug in xyzmatrix.default when dealing with matrix/dataframe input

* bug in fd9283cd5230f556d371c8ebbcbc4d7dbbfb1b0e
* example of over-elaborate if structure and danger of
  if/else structure without braces not be evaluated as expected