Remix - Internal JavaScript VM - Good Result
Here's a screenshot of Remix (Browser Solidity) showing that your contract works as expected:

Remix - geth
RPC - Bad Result
Here's a screenshot of Remix showing that your contract does not work as expected when deploying to a geth
1.5.9 dev blockchain using the parameters you specified in your question.
geth
1.5.9 Command Line - Good Result
I flattened the following code and assigned it to a variable:
pragma solidity ^0.4.2;
contract SimpleStorage {
uint storedData = 4;
function set(uint x) {
storedData = x;
}
function get() constant returns (uint retVal) {
return storedData;
}
}
And ran the following commands in the geth
console:
var simpleStorageSource='pragma solidity ^0.4.2;contract SimpleStorage { uint storedData = 4; function set(uint x) { storedData = x; } function get() constant returns (uint retVal) { return storedData; }}'
var simpleStorageCompiled=web3.eth.compile.solidity(simpleStorageSource);
var simpleStorageContract = web3.eth.contract(simpleStorageCompiled['<stdin>:SimpleStorage'].info.abiDefinition);
var simpleStorage = simpleStorageContract.new({
from: web3.eth.accounts[0],
data: simpleStorageCompiled['<stdin>:SimpleStorage'].code, gas: 400000},
function(e, contract) {
if (!e) {
if (!contract.address) {
console.log("Contract transaction send: TransactionHash: " +
contract.transactionHash + " waiting to be mined...");
} else {
console.log("Contract mined! Address: " + contract.address);
console.log(contract);
}
}
});
Contract transaction send: TransactionHash: 0x45c230b92d8a41c16b74b078323e7fa6e59b07e67bb6e017ac72020a4bf4534c waiting to be mined...
Contract mined! Address: 0x9682c4a5e47a4f61c03118e8bba3de2d203a256c
> simpleStorage.get()
4
It seems the problem may be in Remix. You may want to file a bug report in the Remix repository.
@RolandKofler suggested that the problem could be in geth
's JSON-RPC API.