Ensure that dimensions do not extend beyond field

Change-Id: Ic75e8bf29689a2aff751f5fdb340f74cba5a88b4
Merge "Ensure that dimensions do not extend beyond field"