Factor out of the testcase the code to create a version field in a query.
Expose include_value option on the level of database query models.
Fix failing test using private interface.
Bring back the code cleaning up the leading decorator of the object
which code we want to attach to a query view. The inner decorators are
preserved.