Only count `_id` if it is the last 3 characters in the field name.

This prevents issues when baking models for tables containing `_id`.

Fixes #3230