Index: src/wp-includes/capabilities.php
===================================================================
--- src/wp-includes/capabilities.php	(revision 31134)
+++ src/wp-includes/capabilities.php	(working copy)
@@ -931,6 +931,8 @@
 	public function add_cap( $cap, $grant = true ) {
 		$this->caps[$cap] = $grant;
 		update_user_meta( $this->ID, $this->cap_key, $this->caps );
+		$this->get_role_caps();
+		$this->update_user_level_from_caps();
 	}

 	/**
@@ -946,6 +948,8 @@
 			return;
 		unset( $this->caps[$cap] );
 		update_user_meta( $this->ID, $this->cap_key, $this->caps );
+		$this->get_role_caps();
+		$this->update_user_level_from_caps();
 	}

 	/**
Index: tests/phpunit/tests/user/capabilities.php
===================================================================
--- tests/phpunit/tests/user/capabilities.php	(revision 31134)
+++ tests/phpunit/tests/user/capabilities.php	(working copy)
@@ -694,4 +694,20 @@

 		wp_set_current_user( $old_uid );
 	}
+
+	/**
+	 * @ticket 28374
+	 */
+	function test_current_user_edit_caps() {
+		$user = new WP_User( $this->factory->user->create( array( 'role' => 'contributor' ) ) );
+		wp_set_current_user( $user->ID );
+
+		$user->add_cap( 'publish_posts' );
+		$user->add_cap( 'publish_pages' );
+		$this->assertTrue( $user->has_cap( 'publish_posts' ) );
+		$this->assertTrue( $user->has_cap( 'publish_pages' ) );
+
+		$user->remove_cap( 'publish_pages' );
+		$this->assertFalse( $user->has_cap( 'publish_pages' ) );
+	}
 }
