PGBackend/ECBackend: handle temp objects correctly

Signed-off-by: Samuel Just <sam.just@inktank.com>