Backport an eloquent model fix