Cherry picking change to fix off by one error in use count and sigEvent count. See upstream commit c404640 (Feb. 6, 2014)