Fix and testcase for MODE-1825.

https://issues.jboss.org/browse/MODE-1825

Handles the case where both the columnName and propertyName are null.