Recognize long identifiers from type extensions

Fix #655.