FIx entity rule problem. closes #2635
Fix lock and states. closes #2630

Conflicts:
	inc/inventorycomputerlib.class.php