Add test to verify managedObjectContext on empty results.
Fix bug with refetching due to failure to track applied attribute mapping when mapped value is unchanged. closes #1176