Revert "Minor performance optimization"

This reverts commit 510a8fc6d7fd2af9fd39970ff3de4d9aac382706.