Wrapping {} around code generated from select present only if needed

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>