GRAILS-10138 - retrieve domain class command object from db if params.id
is present

Relevant functional tests: https://github.com/grails/grails-functional-tests/commit/0cdb79164a63c3be3c9f73520746312a47d078de
Fix problem with containsKey('id')