Fix for injecting @ViewScoped beans (#12378)

Change-Id: I007041fb61db81159e9ff9b934995d0d446bf0af