Call to get mapping was limiting the trigger as only 100 soql calls are
allowed. Instead of getting the mapping for every account, get it once
at the start.