Disallow space after opening object curly brace and before closing.

Related to #9849, #10072

Do you want all or nested mode?