Tests for issue with unexpected injection.

Test for Issue #4862