ContainerBuilder: fixed format statement for factory methods

#977