fix global prerequisites inheritance, fixes #1794