Do not throw exception when there is nothing to build

Inspired by http://goo.gl/7Blqbu