Fix for a bug introduced in #656.