Patch for ticket 2560.
Modified tests.
Merge branch 'ticket_2560' of git://github.com/ewongbb/buildbot