Fixed AttributesStatementSetter and some bugs in per-table classes. refs #495