Backport Fix #1153: Inlineable classes break with dependent fields.

(cherry picked from commit 95c4a60cb6522be353425d98754d5e1af229b728)