Adjusted dependency checks to work on extra and environment together.