Clean up bounds handling code in defineShape parsing pipeline