Fix incorrect size query result when storing attributes with terminators.