Move collision resolve logic into local function
Make check_pair() not raise an error

...if the pairs table for ent1 doesn't exist.