Handle inheritance when determining mapping

For any object hierarchy the Single() call failed as there is more than
one.