Add morph type to whereHas queries on MorphToMany. Fixes #3068.