Revert #1530 as it causes unexpected results.