Issue #872: Fixed auto-layout bug