Cleaned up conditional dependency inclusion logic