[BUGFIX beta] Update `verifyNeedsDependencies` to throw instead of assert.

A missing `needs` dependency should raise an error in production builds, not just
in dev builds.
Merge pull request #4018 from lukemelia/missing-needs-throws

[BUGFIX beta] Update `verifyNeedsDependencies` to throw instead of assert