Fixed a bug where pending builds cache was incorrect