Only call ->clearInstanceCache() if $targetUser instanceof User

Bug: 61252
Change-Id: Ibb79ca9a27e50b58fdd5dd541e243054fb095753