Fix for parent class traits and parent traits that do not get booted.

Very similar to https://github.com/laravel/framework/pull/4684.