Fix `loadFromJSON` callback when objects array is empty. Closes #703