Issue #3464426 by dcam, kksandr, alexpott: AutowireTrait and autowire for services behave differently for nullable types (cherry picked from commit 8cd685b9)